package FWK.components;

import org.apache.log4j.Logger;

public abstract class FwkProgressListener {
	
	private static Logger logger = Logger.getLogger(FwkProgressListener.class);
	
	private int currentValue = 0;


	private void setValue(int newValue) {
		currentValue = 0;
		logger.debug("Procesando la tarea : " + newValue);
		currentValue = newValue;
		valueChange(newValue);
	}

	public final void avance() {
		currentValue++;
		setValue(currentValue);
	}

	public abstract void valueChange(int newPorcentage);

	public abstract void start(int total);
	
}
